home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1996 September
/
JCSM Shareware Collection (JCS Distribution) (September 1996).ISO
/
communic
/
commo65.zip
/
COMMO.MAC
< prev
next >
Wrap
Text File
|
1995-07-15
|
21KB
|
487 lines
Most of the macros in this file support {COMMO} features, such as file
transfers and VT102 emulation. Others are provided as examples and may need
to be modified to work for you. More examples are shown in SAMPLES.MAC.
See MACRO.DOC for a complete guide to programming {COMMO} macros. Press
PgDn to view the remainder of this file.
ASCII Upload macro, press Alt-A
────────────────────────────────────────────────────────────────────────────
{:ala} {ascii %uldir\} {} ASCII Upload with upload path
Macro to review capture file, press Shift-F8 Program required
────────────────────────────────────────────────────────────────────────────
{:sf8} {exec LIST %_cap /e} {} (aka Scrollback using no RAM) LIST.COM
Simple login macro, press F2
────────────────────────────────────────────────────────────────────────────
{:nf2} {send First|~~Last|~~~~%_pas|} {} RBBS, PCBoard, Auntie, etc.
Macro to list download directory, press Alt-F10
────────────────────────────────────────────────────────────────────────────
{:af0} {exec-w dir %dldir /w} {} Download directory
Macros to load VT102/VT220/PINE keyboard files and set VT emulation
────────────────────────────────────────────────────────────────────────────
{:vt102} {parm ,,,V} {goto ,vt102.mac} Linked Macro is "vt102"
{:vt220} {parm ,,,V} {goto ,vt220.mac} Linked Macro is "vt220"
{:pine} {parm ,,,V} {goto ,pine.mac} Linked Macro is "pine"
Macro to login to a PCBoard (put "pcb" in Dialing Directory macro field)
────────────────────────────────────────────────────────────────────────────
{:pcb} {capture y,c:\commo\pcb.cap} {asci ,}
{setlook 60,hng}
{lookfor graphics} {send y|}
{setlook 60,hng,6,n|}
{lookfor first name?}
{send First Last|~%_pas|} <= your name here
{lookfor Main Board Command?} {}
{:hng} {hangup y} {stop}
CompuServe login macro
────────────────────────────────────────────────────────────────────────────
{:cis} {setlook 45,hng,2,^c} {send ^c}
{capt y,c:\commo\cis.%_day} {asci ,:}
{lookfor User ID:} {send XXXXX,XXX|} <= Change to your user ID
{setl 20,hng} {lookfor Password:} {send %_pas|} {}
GEnie login macro
────────────────────────────────────────────────────────────────────────────
{:genie}
{setlook 90,hng} {capt y,c:\commo\genie.%_day}
{asci ,>} {local y} {send ~H~H~H}
{lookfor u#} {send XXXXXXXX,%_pas|} {} <= Change to your user #
Doorway Mode macro (key must be defined in COMMO.SET)
────────────────────────────────────────────────────────────────────────────
{:al=} {doorway} {} Toggle Doorway Mode
Macro to report {COMMO} version number
────────────────────────────────────────────────────────────────────────────
{:alv} {info-d2s0 Version is %_ver} {}
DOWNLOAD (receive) menu macro
────────────────────────────────────────────────────────────────────────────
{:pgd} {:mpd}
{setv _menu1, Press "M" to change Zmodem receive mode}
{setv _menu3, Z ■ Zmodem batch (mode=%zr_mode) Internal}
{setv _menu4, Y ■ Ymodem batch Internal}
{setv _menu5, G ■ Ymodem-G batch Internal}
{setv _menu6, X ■ Xmodem-CRC (or old Ymodem) Internal}
{setv _menu7, O ■ Xmodem-G Internal}
{setv _menu8, S ■ Xmodem csum Internal}
{setv _menu10, External Protocols (program required)}
{setv _menu12, H ■ HS/Link using HSLINK.EXE}
{setv _menu13, K ■ Kermit using KERMIT.EXE}
{setv _menu14, B ■ CompuServe B, B+ using OZBEXT.EXE}
{setv _mlabel,phld,pcbr,,,,,pygr,phbr,,,pckr,,pmzm,,pxgr,,,,px2r,,,,,px1r,pybr,pzbr}
{setv _mcolor,%menu_clr}
{menu 18,47,DOWNLOAD Protocol Menu [F1] Help} {return}
Help {:phld} {help z} {goto mpd}
Zmodem {:pzbr} {setv pr_alarm} {setv pr_down,%dldir} {call z_recv} {}
Y batch {:pybr} {setv pr_alarm} {setv pr_down,%dldir} {call yb_recv} {}
Y-G batch {:pygr} {setv pr_alarm} {setv pr_down,%dldir} {call yg_recv} {}
X CRC {:px1r} {setv pr_alarm} {call gfnd} {call xc_recv} {}
X-G {:pxgr} {setv pr_alarm} {call gfnd} {call xg_recv} {}
X csum {:px2r} {setv pr_alarm} {call gfnd} {call xs_recv} {}
HSLink {:phbr} {setv pr_alarm} {setv pr_down,%dldir} {setv pr_file}
{info-q0s0 Any files to upload?}
{ifco ,phbr_1} {call gfnu}
{:phbr_1} {call h_recv} {}
Kermit {:pckr} {setv pr_alarm} {setv pr_down,%dldir} {call k_recv} {}
CIS BPlus {:pcbr} {setv pr_alarm} {setv pr_down,%dldir} {call b_recv} {}
{:gfnd} {setv pr_file,%dldir\} {input pr_file,Enter a filename to DOWNLOAD}
{ifex %pr_file,,gf_y} {info-q0 File exists, overwrite?}
{ifco gf_y} {send ^x^x^x^x^x^x^x^x^h^h^h^h^h^h^h^h^h^h} {}
{:gf_y} {return}
UPLOAD (send) menu macro
────────────────────────────────────────────────────────────────────────────
{:pgu} {:mpu}
{setv _menu1, Z ■ Zmodem batch Internal}
{setv _menu2, Y ■ Ymodem batch Internal}
{setv _menu3, G ■ Ymodem-G batch Internal}
{setv _menu4, X ■ Xmodem-1K (old Ymodem) Internal}
{setv _menu5, O ■ Xmodem-G Internal}
{setv _menu6, S ■ Xmodem Internal}
{setv _menu7, I ■ ASCII Upload Internal}
{setv _menu9, External Protocols (program required)}
{setv _menu11, H ■ HS/Link using HSLINK.EXE}
{setv _menu12, K ■ Kermit using KERMIT.EXE}
{setv _menu13, B ■ CompuServe B, B+ using OZBEXT.EXE}
{setv _mlabel,phlu,pcbs,,,,,pybs,phbs,paus,,pcks,,,,px1s,,,,px2s,,,,,px1s,pybs,pzbs}
{setv _mcolor,%menu_clr}
{menu 17,47,UPLOAD Protocol Menu [F1] Help} {return}
Help {:phlu} {help z} {goto mpu}
Y batch {:pybs} {setv pr_alarm} {call gfnu} {call yb_send} {}
X-1K {:px1s} {setv pr_alarm} {call gfnu_x} {call xk_send} {}
X {:px2s} {setv pr_alarm} {call gfnu_x} {call x_send} {}
ASCII {:paus} {call gfnu_x} {asci %pr_file} {}
Zmodem {:pzbs} {setv pr_alarm} {call gfnu} {call z_send} {}
HS/Link {:phbs} {setv pr_alarm} {setv pr_down,%dldir} {call gfnu}
{call h_send} {}
Kermit {:pcks} {setv pr_alarm} {call gfnu_x} {call k_send} {}
CIS BPlus {:pcbs} {setv pr_alarm} {setv pr_up,%uldir} {call b_send} {}
{:gfnu} {call sel_delsend}
{inst sel_up,y} {comp _pos,1} {ifco gfnu_s}
{setv pr_file,%uldir\}
{:gfnu_f} {setv temp,%pr_file}
{input pr_file,Filename to UPLOAD (Press Enter for picklist)}
{comp pr_file} {ifco gfnu_s}
{comp pr_file,%temp} {ifco gfnu_s}
{ifex %pr_file,,gfnu_n} {return}
{:gfnu_n} {info-d2 File not found} {goto gfnu_f}
{:gfnu_s} {inst sel_pns,y} {comp _pos,1} {ifco gfnu_p}
{call select} {goto gfnu_t}
{:gfnu_p} {setv pr_file,@%_hom%^(send^).lst}
{exec-d %protodir\COMMOPNS.EXE %_hom%^(send^).lst -D%uldir -S%_mod}
{:gfnu_t} {comp pr_file} {ifco gfnu_c}
{ifexist %_hom^(send^).lst,,gfnu_c} {return}
{:gfnu_c} {send ^x^x^x^x^x^x^x^x^h^h^h^h^h^h^h^h^h^h}
{inform-s0d1 No files to send} {}
{:gfnu_x} {call gfnu} {ifex %_hom^(send^).lst,,gfnu_r}
{ropen %_hom^(send^).lst,gfnu_c}
{:gfnu_a} {read pr_file} {comp pr_file} {ifco gfnu_a} {rclose}
{:gfnu_r} {return}
Protocol macros used for DOWNLOADING (receiving)
────────────────────────────────────────────────────────────────────────────
These are the basic download protocol macros and may be CALLed
from anywhere. The following variables must be set (if applicable):
pr_down download directory
pr_file filespec (files to download)
pr_alarm set to: 0 - alarm off
1+ - number of rings
null - default rings (from setup)
Internals
{:z_recv} {goto zmr_%zr_mode} Zmodem batch
{:zmr_s} {:zmr_} {rzmo %pr_down} {goto zmr_end} Skip (default)
{:zmr_r} {rzmo-r %pr_down} {goto zmr_end} Resume
{:zmr_n} {rzmo-n %pr_down} {goto zmr_end} Rename
{:zmr_o} {rzmo-y %pr_down} {goto zmr_end} Overwrite
{:zmr_end} {call ring_alarm} {retu}
{:yb_recv} {rymo %pr_down} {call ring_alarm} {retu} Ymodem batch
{:yg_recv} {rymo-g %pr_down} {call ring_alarm} {retu} Ymodem-G batch
{:xc_recv} {rxmo-y %pr_file} {call ring_alarm} {retu} Xmodem-CRC
{:xg_recv} {rxmo-gy %pr_file} {call ring_alarm} {retu} Xmodem-G
{:xs_recv} {rxmo-c0y %pr_file} {call ring_alarm} {retu} Xmodem-Csum
HS/Link
{:h_recv} {exec-d %protodir\HSLINK.EXE -pb0x%_pad -pi%_irq -nv %pr_file -u%pr_down}
{call ring_alarm} {retu}
Kermit
{:k_recv} {wopen %_hom%kerm_rcv.ini}
{write set file type binary}
{write set receive packet-length 1024}
{write log transaction %_uselog}
{write set com%_por \x%_pad %_irq}
{write set port %_por}
{write cd %pr_down}
{write receive}
{wclose}
{exec-d %protodir\KERMIT.EXE take %_hom%kerm_rcv.ini}
{call ring_alarm} {retu}
CIS BPlus
{:b_recv} {keys 2e03} Stuff a Ctrl-C
{exec-d %protodir\OZBEXT.EXE /c%_por /f%pr_down /n /x}
{call ring_alarm} {retu}
Protocol macros used for UPLOADING (sending)
────────────────────────────────────────────────────────────────────────────
These are the basic upload protocol macros and may be CALLed
from anywhere. The following variables must be set (if applicable):
pr_up upload directory (B+ only)
pr_down download directory (HS/Link only)
pr_file filespec (files to upload)
pr_alarm set to: 0 - alarm off
1+ - number of rings
null - default rings (from setup)
Internals
{:z_send} {szmo-r %pr_file} {call ring_alarm} {retu} Zmodem batch
{:yb_send} {symo-k %pr_file} {call ring_alarm} {retu} Ymodem batch
{:xk_send} {sxmo-k %pr_file} {call ring_alarm} {retu} Xmodem 1k
{:x_send} {sxmo %pr_file} {call ring_alarm} {retu} Xmodem
HS/Link
{:h_send} {exec-d %protodir\HSLINK.EXE -pb0x%_pad -pi%_irq -nv %pr_file -u%pr_down}
{call ring_alarm} {retu}
Kermit
{:k_send} {wopen %_hom%kerm_snd.ini}
{write set file type binary}
{write set send packet-length 1024}
{write log transaction %_uselog}
{write set com%_por \x%_pad %_irq}
{write set port %_por}
{write send %pr_file}
{wclose}
{exec-d %protodir\KERMIT.EXE take %_hom%kerm_snd.ini}
{call ring_alarm} {retu}
CIS BPlus
{:b_send} {keys 2e03} Stuff a Ctrl-C
{exec-d %protodir\OZBEXT.EXE /c%_por /f%pr_up /n /x}
{call ring_alarm} {retu}
{:ring_alarm} {ifer 1,ring_fail} {alarm %pr_alarm} {return}
{:ring_fail} {alarm-f %pr_alarm} {return}
Zmodem like-named file menu macro
────────────────────────────────────────────────────────────────────────────
{:pmzm}
{goto zmm_%zr_mode}
{:zmm_s} {:zmm_} {setv zmr_disp,Skip} {setv zmr_temp,s} {goto zmr_menu}
{:zmm_r} {setv zmr_disp,Resume} {setv zmr_temp,r} {goto zmr_menu}
{:zmm_n} {setv zmr_disp,Rename} {setv zmr_temp,n} {goto zmr_menu}
{:zmm_o} {setv zmr_disp,Overwrite} {setv zmr_temp,o}
{:zmr_menu}
{setv _menu1, This parameter tells ^(COMMO^) what to}
{setv _menu2, do when a file received with Zmodem}
{setv _menu3, has the same name as a file that is}
{setv _menu4, already in the download directory.}
{setv _menu6, S ■ Skip (do not receive the file)}
{setv _menu7, R ■ Resume (receive remainder of file)}
{setv _menu8, N ■ Rename (change last letter of name)}
{setv _menu9, O ■ Overwrite (replace the existing file)}
{setv _menu11, Current setting is "%zmr_disp"}
{setv _menu13, Press Enter to save setting}
{setv _mlabel,,,,,,,,,,,,,,zmm_n,zmm_o,,,zmm_r,zmm_s}
{setv _menter,zmr_done}
{setv _mcolor,%menu_clr}
{window-k}
{menu 17,47,Set Zmodem File Receive Mode} {goto zmr_esc}
{:zmr_done}
{setv zr_mode,%zmr_temp}
{:zmr_esc}
{setv zmr_disp} {setv zmr_temp} {wind-k0} {goto mpd}
File select macro used for uploading files
────────────────────────────────────────────────────────────────────────────
{:select}
{setv fspec,*.*} <-- Set default filespec
{setv dsksav,%_dsk} {setv dirsav,%_dir}
{:sel_curdir}
{setv drive,%_dsk} {setv path,%_dir}
{comp uldir} {ifco sel_nouldir}
{setv path,%uldir} {inst %uldir,:}
{comp _pos,2} {ifco ,sel_nodrive}
{subs drive,1,2,%uldir} {subs path,3,66,%uldir}
{:sel_nouldir}
{call sel_chkpath}
{:sel_nodrive}
{file %drive%%path\%fspec}
{ifco sel_dirok}
{info-q ULDIR is not a valid directory. Change it?}
{ifco ,sel_exit}
{input uldir,Enter new upload directory (no "\" at end)}
{goto sel_curdir}
{:sel_dirok}
{exec-n %drive}
{comp path} {ifco sel_root}
{exec-n cd %path} {goto sel_disp}
{:sel_root}
{exec-n cd \}
{:sel_disp}
{wind-k} {file-s %drive%%path\%fspec}
{comp _err,0} {ifco sel_done}
{comp _err,1} {ifco sel_escape}
{comp _err,2} {ifco sel_edit}
{comp _err,3} {ifco sel_drive}
{comp _err,4} {ifco sel_dirchg}
{comp _err,5} {ifco sel_fspchg} {goto sel_disp}
{:sel_fspchg}
{setv fspec,%_ffn} {goto sel_disp}
{:sel_dirchg}
{subs temp,2,13,%_ffn} {exec-n cd %temp} {setv path,%_dir}
{call sel_chkpath} {goto sel_disp}
{:sel_drive}
{setv drive,%_ffn:}
{exec-n %drive} {setv path,%_dir}
{call sel_chkpath} {goto sel_disp}
{:sel_edit}
{edit %_hom^(send^).lst} {goto sel_disp}
{:sel_escape}
{call sel_delsend} {goto sel_exit}
{:sel_done}
{setv pr_file,@%_hom%^(send^).lst}
{:sel_exit}
{exec-n %dsksav} {exec-n cd %dirsav}
{setv dsksav} {setv dirsav} {setv temp} {setv drive}
{setv path} {setv fspec}
{wind-k0} {return}
{:sel_chkpath}
{leng %path}
{comp _len,1} {ifco ,sel_notroot} {setv path}
{:sel_notroot}
{return}
{:sel_delsend}
{ifex %_hom%^(send^).lst,,sel_nolst}
{exec-n del %_hom%^(send^).lst}
{:sel_nolst}
{return}
Macros for Utility Menu
────────────────────────────────────────────────────────────────────────────
{:alu}
{setv _menu1, D ≡ add a new Dialing Directory entry}
{setv _menu2, 1 ≡ set VT102 emulation}
{setv _menu3, 2 ≡ set VT220 emulation}
{setv _menu4, P ≡ set emulation for PINE system}
{setv _menu5, E ≡ Edit an external file}
{setv _menu6, R ≡ Run a macro}
{setv _menu7, L ≡ Load a macro file}
{setv _menu8, H ≡ run MOSTHOST Host mode}
{setv _menu9, (use I to install)}
{setv _menu10, I ≡ Install/view MOSTHOST}
{setv _menu11, V ≡ modify a Variable}
{setv _menu12, (for this session only)}
{setv _mlabel,vt102,vt220,,ufon,uext,,,uhost,vhost,,,uload,,,,pine,,urun,,,,mvari}
{setv _mcolor,%menu_clr}
{menu 16,43,^(COMMO^) Utility Menu} {}
{:urun} {setv temp} {input temp,Macro to run} {goto %temp} {}
{:uload} {setv temp} {input temp,Macro File to load}
{ifex %temp,,alu} {goto-f ,%temp}
{:uext} {setv temp} {input temp,Filename to edit}
{:uedit} {ifex %temp,,alu} {edit %temp} {goto alu}
{:uhost} {call bbs,mosthost.mac}
{:vhost} {setv temp,%_hom%mosthost.mac} {goto uedit}
{:mvari}
{setv _menu1, 1 ≡ Download Path}
{setv _menu3, 2 ≡ Upload Path}
{setv _menu5, 3 ≡ Modem Init String}
{setv _menu7, 4 ≡ Dialing Prefix}
{setv _menu9, 5 ≡ Pacing Character}
{setv _mlabel,mvar1,mvar2,mvar3,mvar4,mvar5}
{setv _mcolor,%menu_clr}
{menu 13,27,Modify a Variable} {}
{:mvar1} {input dldir,Download Path, no "\" at end} {}
{:mvar2} {input uldir,Upload Path, no "\" at end} {}
{:mvar3} {input _modini,Modem Initialization String} {}
{:mvar4} {input _dialpf,Dialing Prefix, e.g., ATDT} {}
{:mvar5} {setv temp} {input temp,Pacing Character for ASCII Upload}
{asci ,%temp} {}
{:ufon} Adapted from a macro by Jeff Bishop.
{setv entry} {inpu entry,The name of the system to be called}
{setv entry, %entry ^(} {setv emu_type}
{setv temp} {inpu temp,The system's phone number}
{setv entry,%entry%%temp^) ^(}
{setv temp} {inpu temp,Password for this system, [Enter] for none}
{setv entry,%entry%%temp^) ^(}
{setv _menu1, 1 ≡ Load VT102 keyboard file, set VT emulation}
{setv _menu2, 2 ≡ Load VT220 keyboard file, set VT emulation}
{setv _menu3, P ≡ Load PINE keyboard file, set VT emulation}
{setv _menu4, E ≡ Enter label for your own macro}
{setv _menu6, Press [Enter] for no macro}
{setv _menter,add_parm}
{setv _mlabel,add_102,add_220,,,add_own,,,,,,,,,,,add_pine}
{setv _mcolor,%menu_clr}
{menu 10,52,Choose Macro to Run When Connected} {goto add_end}
{:add_own}
{setv temp} {inpu temp,Linked Macro for this system}
{setv entry,%entry%%temp}
{goto add_parm}
{:add_pine}
{setv entry,%entry%pine} {goto add_vt}
{:add_102}
{setv entry,%entry%vt102} {goto add_vt}
{:add_220}
{setv entry,%entry%vt220}
{:add_vt} {setv emu_type,,,V}
{:add_parm}
{setv temp}
{setv _menu1, 7 ≡ 7e1}
{setv _menu2, 8 ≡ 8n1}
{setv _menu4, Press [Enter] for default}
{setv _menter,add_p3}
{setv _mlabel,,,,,,,add_p1,add_p2}
{setv _mcolor,%menu_clr}
{menu 8,39,Choose Data Format Parameters} {goto add_end}
{:add_p1} {setv temp,7e1} {goto add_p3}
{:add_p2} {setv temp,8n1}
{:add_p3} {comp emu_type} {ifco ,add_e4}
{:emu_type}
{setv emu_type}
{setv _menu1, A ≡ ANSI-BBS}
{setv _menu2, V ≡ VT102/VT220}
{setv _menu3, T ≡ TTY}
{setv _menu5, Press [Enter] for default}
{setv _menter,add_e4}
{setv _mlabel,add_e1,,,,,,,,,,,,,,,,,,,add_e2,add_e3}
{setv _mcolor,%menu_clr}
{menu 9,35,Choose Terminal Emulation} {goto add_end}
{:add_e1} {setv emu_type,,,A} {goto add_e4}
{:add_e2} {setv emu_type,,,T} {goto add_e4}
{:add_e3} {setv emu_type,,,V}
{:add_e4} {setv temp,,%temp%%emu_type}
{comp temp,,} {ifco ,add_e5} {setv temp}
{:add_e5} {setv entry,%entry%^) ^(%temp^) 00/00/00}
{exec-ns ver>nul}
{wope-a %_hom%%_fon} {writ %entry} {wclo}
{exec-ns ver>nul}
{info-D1 Dialing Directory entry completed}
{:add_end}
{setv entry} {setv temp} {setv emu_type}
{retu}
──────────────────────────────
Full Screen Editor Key Support
──────────────────────────────
The following keys are used by full screen editors such as Visual Editor in
ProDoor, PCBoard's full screen editor, ANSIED in RBBS and others. They may
be changed to suit your own needs (all keys do not work with all editors --
capture the editor help info on the BBS). See Appendix D in COMMO.DOC for
details on character representation.
PgUp and PgDn are normally used for uploading and downloading. To use them
for editing, change the key-labels in the menus above.
Macro Key Function
────────────────────────────────────────────────────────────────────────────
{:hom} {send ^W} {} Home Start of line
{:end} {send ^P} {} End End of line
{:pgu} {send ^R} {} PgUp Page up
{:pgd} {send ^C} {} PgDn Page down
{:upa} {send ^[[A} {} Up Arrow Cursor up
{:dna} {send ^[[B} {} Down Arrow Cursor down
{:lfa} {send ^[[D} {} Left Arrow Cursor left
{:rta} {send ^[[C} {} Right Arrow Cursor right
{:cla} {send ^A} {} ^Left Arrow Word left
{:cra} {send ^F} {} ^Right Arrow Word right
{:ins} {send ^V} {} Insert Toggle insert mode
{:del} {send ^G} {} Delete Delete character
{:cnd} {send ^K} {} ^End Delete to end of line
- end -